from appium import webdriver
from common.read_appconf import ReadConfig
from common import BASE_DIR

class Base:
    def __init__(self):

        #caps = {}
        #caps["platformName"] = "Android"
        #caps["platformVersion"] = "7.1.2"
        #caps["deviceName"] = "127.0.0.1:62001"
        #caps["appPackage"] = "com.flutter_luckin_coffee"
        #caps["appActivity"] = "com.flutter_luckin_coffee.MainActivity"
        #caps["resetKeyboard"] = True
        #caps["unicodeKeyboard"] = True
        print(ReadConfig.read_app_conf(BASE_DIR + "/config/app.conf.json"))
        self.driver = webdriver.Remote("http://localhost:4723/wd/hub", ReadConfig.read_app_conf(BASE_DIR + "/config/app.conf.json"))

        #self.driver = webdriver.Remote("http://localhost:4723/wd/hub",caps)
        self.driver.implicitly_wait(15)

if __name__ == '__main__':
    Base()

